<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        {:build_heading(null,FALSE)}
        <ul class="nav nav-tabs">
            <li class="active"><a href="#edit" data-toggle="tab">{:__('编辑商品')}</a></li>
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="edit">
                <div class="widget-body no-padding">
                    <form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('Product_name')}:</label>
                            <div class="col-xs-12 col-sm-8">
                                <input id="c-product_name" class="form-control" name="row[product_name]" type="text" value="{$row.product_name|htmlentities}" data-rule="required">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('Unit_price')}:</label>
                            <div class="col-xs-12 col-sm-8">
                                <input id="c-unit_price" class="form-control" name="row[unit_price]" type="number" value="{$row.unit_price}" data-rule="required;gt(0)" step="0.01">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('Jin_per_bag')}:</label>
                            <div class="col-xs-12 col-sm-8">
                                <input id="c-jin_per_bag" class="form-control" name="row[jin_per_bag]" type="number" value="{$row.jin_per_bag}" step="0.01">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('Bags_per_piece')}:</label>
                            <div class="col-xs-12 col-sm-8">
                                <input id="c-bags_per_piece" class="form-control" name="row[bags_per_piece]" type="number" value="{$row.bags_per_piece}" step="0.01">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('Image_path')}:</label>
                            <div class="col-xs-12 col-sm-8">
                                <div class="input-group">
                                    <input id="c-image_path" class="form-control" size="50" name="row[image_path]" type="text" value="{$row.image_path|htmlentities}">
                                    <div class="input-group-addon no-border no-padding">
                                        <span><button type="button" id="plupload-image_path" class="btn btn-danger plupload" data-input-id="c-image_path" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image_path"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                        <span><button type="button" id="fachoose-image_path" class="btn btn-primary fachoose" data-input-id="c-image_path" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                                    </div>
                                    <span class="msg-box n-right" for="c-image_path"></span>
                                </div>
                                <ul class="row list-inline plupload-preview" id="p-image_path">
                                    {php}
                                    if(isset($row['image_path']) && $row['image_path']){
                                    {/php}
                                    <li><a href="{$row.image_path}" target="_blank"><img src="{$row.image_path}" class="img-responsive"></a></li>
                                    {php}
                                    }
                                    {/php}
                                </ul>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
                            <div class="col-xs-12 col-sm-8">
                                <div class="radio">
                                    {:build_radios('row[status]', ['normal'=>__('Normal'), 'hidden'=>__('Hidden')], $row['status'])}
                                </div>
                            </div>
                        </div>
                        <div class="form-group layer-footer">
                            <label class="control-label col-xs-12 col-sm-2"></label>
                            <div class="col-xs-12 col-sm-8">
                                <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                                <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div> 